
/**
 * 用户类型声明
 */

export interface userState {
  token: string
  name: string,
  avatar: string,
  roles: any[],
  permissions: string[]
  expires_in: string,
  [x: string]: any
}

/**
 * 字典类型声明
 */
export type Dict = {
  key?: string,
  value?: any,
  [x: string]: any
}
export interface dictState {
  dictMap: Map<string, Dict[]>
}

/**
 * 权限类型声明
 */
export interface route {
  path: string,
  permissions?: any,
  roles?: any,
  components?: any,
  redirect?: string,
  meta?: {
    [x: string]: any
  },
  children?: route[],
  [x: string]: any
}
export interface permissionState {
  Layout: any,
  routes: route[],
  addRoutes: route[],
  defaultRoutes: route[],
  topbarRouters: route[],
  sidebarRouters: route[],
  parentId: string,
}

/**
 * 设置类型声明
 */
export interface settingsState {
  title: string 
  nowDateObject: {
    week: string,
    date: string,
    time: string
  },
  startMenuDockVisiable: boolean,
}

/**
 * 桌面开始菜单、应用是否选中等值的key
 */
export type settingFlagKey = 'startMenuDockVisiable'

/**
 * 通用模板类型声明
 */
export interface templateState {
  templateInfo: Map<string, any>
}

/**
 * tagsView类型声明
 */
export interface tagsViewState {
  visitedViews: any[],
  cachedViews: any[],
  iframeViews: any[]
}

/**
 * 桌面设置类型声明
 */
export interface desktopSettingsState {
  nowDateObject: {
    week: string,
    date: string,
    time: string
  },
  startMenuDockVisiable: boolean,
}